# 获取热点板块和概念所有的股票
# 缓存起来并提供查询【code,(行业，概念)】
from pathlib import Path

import akshare as ak


def get_concept_stock(concept):
    stocks = ak.stock_board_concept_cons_em(symbol=concept)
    return stocks


def get_hy_stock():
    # stock_board_industry_cons_em
    stocks = ak.stock_board_industry_cons_em(symbol='能源金属')
    return stocks


def save_concept(symbol):
    data = get_concept_stock(symbol)
    file_path = Path(f"../../excel/{symbol}.xlsx")

    data.to_excel(file_path)
